package pack0827;


public class Users {
    private Integer Empno;
    private String Ename;
    private String Job;
    private Integer Mgr;
    private String HireDate;
    private Integer Sal;
    private Integer Comm;
    private Integer Deption;

    public Users(){

    }

    public Users(Integer empno, String ename, String job, Integer mgr, String hireDate, Integer sal, Integer comm, Integer deption) {
        Empno = empno;
        Ename = ename;
        Job = job;
        Mgr = mgr;
        HireDate = hireDate;
        Sal = sal;
        Comm = comm;
        Deption = deption;
    }

    public void setEmpno(Integer empno) {
        Empno = empno;
    }

    public Integer getEmpno(){
        return Empno;
    }

    public void setEname(String ename) {
        Ename = ename;
    }

    public String getEname(){
        return Ename;
    }

    public void setJob(String job){
        Job = job;
    }

    public String getJob(){
        return Job;
    }

    public void setMgr(Integer mgr) {
        Mgr = mgr;
    }

    public Integer getMgr(){
        return Mgr;
    }

    public void setHireDate(String hireDate) {
        HireDate = hireDate;
    }

    public String getHireDate() {
        return HireDate;
    }

    public void setSal(Integer sal) {
        Sal = sal;
    }

    public Integer getSal() {
        return Sal;
    }

    public void setComm(Integer comm) {
        Comm = comm;
    }

    public Integer getComm() {
        return Comm;
    }

    public void setDeption(Integer deption) {
        Deption = deption;
    }

    public Integer getDeption() {
        return Deption;
    }


    @Override
    public String toString() {
       if(Mgr==null&&Comm==null){
           if (Job.length()<8){
               if(Sal<1000){
                   return  Empno +"\t"+
                           Ename + "\t" +
                           Job + "\t\t" +
                           "-" +"\t\t" +
                           HireDate + "\t" +
                           Sal +"\t\t" +
                           "-" +"\t\t" +
                           Deption;
               }else{
                   return  Empno +"\t"+
                           Ename + "\t" +
                           Job + "\t\t" +
                           "-" +"\t\t" +
                           HireDate + "\t" +
                           Sal +"\t" +
                           "-" +"\t\t" +
                           Deption;
               }
           }else {
               if (Sal<1000){
                   return  Empno +"\t"+
                           Ename + "\t" +
                           Job + "\t" +
                           "-" +"\t\t" +
                           HireDate + "\t" +
                           Sal +"\t\t" +
                           "-" +"\t\t" +
                           Deption;
               }else{
                   return  Empno +"\t"+
                           Ename + "\t" +
                           Job + "\t" +
                           "-" +"\t\t" +
                           HireDate + "\t" +
                           Sal +"\t" +
                           "-" +"\t\t" +
                           Deption;
               }
           }

       }else if(Comm==null){
           if (Job.length()<8){
               if (Sal<1000){
                   return  Empno +"\t"+
                           Ename + "\t" +
                           Job + "\t\t" +
                           Mgr +"\t" +
                           HireDate + "\t" +
                           Sal +"\t\t" +
                           "-" +"\t\t" +
                           Deption;
               }else{
                   return  Empno +"\t"+
                           Ename + "\t" +
                           Job + "\t\t" +
                           Mgr +"\t" +
                           HireDate + "\t" +
                           Sal +"\t" +
                           "-" +"\t\t" +
                           Deption;
               }
           }else {
               if (Sal<1000){
                   return  Empno +"\t"+
                           Ename + "\t" +
                           Job + "\t" +
                           Mgr +"\t" +
                           HireDate + "\t" +
                           Sal +"\t\t" +
                           "-" +"\t\t" +
                           Deption;
               }else{
                   return  Empno +"\t"+
                           Ename + "\t" +
                           Job + "\t" +
                           Mgr +"\t" +
                           HireDate + "\t" +
                           Sal +"\t" +
                           "-" +"\t\t" +
                           Deption;
               }
           }
       }else{
           if (Job.length()<8){
               if(Sal<1000){
                   if (Comm<1000){
                       return  Empno +"\t"+
                               Ename + "\t" +
                               Job + "\t\t" +
                               Mgr +"\t" +
                               HireDate + "\t" +
                               Sal +"\t\t" +
                               Comm +"\t\t" +
                               Deption;
                   }else {
                       return  Empno +"\t"+
                               Ename + "\t" +
                               Job + "\t\t" +
                               Mgr +"\t" +
                               HireDate + "\t" +
                               Sal +"\t\t" +
                               Comm +"\t" +
                               Deption;
                   }
               }else{
                   if (Comm<1000){
                       return  Empno +"\t"+
                               Ename + "\t" +
                               Job + "\t\t" +
                               Mgr +"\t" +
                               HireDate + "\t" +
                               Sal +"\t" +
                               Comm +"\t\t" +
                               Deption;
                   }else {
                       return  Empno +"\t"+
                               Ename + "\t" +
                               Job + "\t\t" +
                               Mgr +"\t" +
                               HireDate + "\t" +
                               Sal +"\t" +
                               Comm +"\t" +
                               Deption;
                   }
               }
           }else {
               if (Sal<1000){
                  if (Comm<1000){
                      return  Empno +"\t"+
                              Ename + "\t" +
                              Job + "\t" +
                              Mgr +"\t" +
                              HireDate + "\t" +
                              Sal +"\t\t" +
                              Comm +"\t\t" +
                              Deption;
                  }else {
                      return  Empno +"\t"+
                              Ename + "\t" +
                              Job + "\t" +
                              Mgr +"\t" +
                              HireDate + "\t" +
                              Sal +"\t\t" +
                              Comm +"\t" +
                              Deption;
                  }
               }else{
                   if (Comm<1000){
                       return  Empno +"\t"+
                               Ename + "\t" +
                               Job + "\t" +
                               Mgr +"\t" +
                               HireDate + "\t" +
                               Sal +"\t" +
                               Comm +"\t\t" +
                               Deption;
                   }else {
                       return  Empno +"\t"+
                               Ename + "\t" +
                               Job + "\t" +
                               Mgr +"\t" +
                               HireDate + "\t" +
                               Sal +"\t" +
                               Comm +"\t" +
                               Deption;
                   }
               }
           }
       }
    }
}
